package com.java.tutorials.spring.timer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
/**
 * Created by xuzhike on 2016/1/30.
 * http://blog.csdn.net/u010994277/article/details/43835945
 */
public class TaskOne extends QuartzJobBean {

    protected static final Logger log=LogManager.getLogger(TaskOne.class);

    private int timeout;

    /**
     * Setter called after the ExampleJob is instantiated
     * with the value from the JobDetailBean (5)
     */
    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    @Override
    protected void executeInternal(JobExecutionContext arg0)
            throws JobExecutionException {
        // TODO Auto-generated method stub
        log.info("-----定时任务执行-----");
        System.out.println("-----定时任务执行1-----");

    }


}
